<template>
	<!-- 组件7 -->
	<view class="combox">
		<view class="flex-row align-center" style="">
			<view class="" style="width: 8rpx;height: 40rpx;border-radius: 50rpx;background: #00D9B2;">
			</view>
			<view class=" fz40 fwbold" style="margin-left: 8rpx;color: #00D9B2;">
				联系我们
			</view>
		</view>
		<view class="color303b39 fwbold fz32 mt40">
			医学顾问快速一对一免费咨询
		</view>
		<view class="mt32 justify-between flex-wrap" style="align-content: space-between;">
			<view class="comcard flex-col align-center" style="padding: 40rpx;">
				<view class="bgfff align-center justify-center"
					style="width: 200rpx;height: 200rpx;border-radius: 16rpx;">
					<image src="../../static/images/serve/zxkf.png" style="width: 190rpx;height: 190rpx;" mode=""></image>
				</view>
				<view class="color303b39 fz32 fwbold mt32" style="line-height: 32rpx;">
					微信扫一扫
				</view>
				<view class=" fz24 mt25" style="color: #576260;">
					添加好友免费咨询
				</view>
			</view>
			<view class="comcard flex-col align-center" style="padding: 40rpx;">
				<view class="bgfff align-center justify-center"
					style="width: 200rpx;height: 200rpx;border-radius: 16rpx;">
					<image src="../../static/images/serve/gzh.png" style="width: 190rpx;height: 190rpx;" mode=""></image>

				</view>
				<view class="color303b39 fz32 fwbold mt32" style="line-height: 32rpx;">
					关注药队长公众号
				</view>
				<view class=" fz24 mt25" style="color: #576260;">
					随时了解最新动态
				</view>
			</view>
			 <a href="tel:4000012811">
				<view class="comcard flex-col align-center" style="padding: 40rpx;">
					<view class="bgfff align-center justify-center"
						style="width: 200rpx;height: 200rpx;border-radius: 16rpx;">
						<image src="../../static/images/serve/phone.png" style="width: 98rpx;height: 98rpx;" mode="">
						</image>
					</view>
					<view class="color303b39 fz32 fwbold mt32" style="line-height: 32rpx;">
						药队长免费电话
					</view>
					<view class=" fz32 color303b39 fwbold mt25" style=";">
						400-001-2811
					</view>
				</view>
			</a>
			<view class="comcard flex-col align-center" style="padding: 40rpx;"  @click="toWxkf">
				<view class="bgfff align-center justify-center"
					style="width: 200rpx;height: 200rpx;border-radius: 16rpx;">
					<image src="../../static/images/serve/lxkf.png" style="width: 98rpx;height: 98rpx;" mode="">
					</image>
				</view>
				<view class="color303b39 fz32 fwbold mt32" style="line-height: 32rpx;">
					药队长医学顾问
				</view>
				<view class=" fz24 mt25" style="color: #576260;">
					24h在线免费人工咨询
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
	methods: {
	
		toWxkf() {
			// window.open('https://work.weixin.qq.com/ca/cawcdedcf41d9a6af6')
				if (plus.os.name == 'Android') {
					//安卓
					if (
						plus.runtime.isApplicationExist({
							//查看安卓系统手机有没有下载这款app
							pname: 'com.tencent.mm' //微信app云打包的包名
						})
					) {
						//安装了app
						plus.runtime.openURL(
							'https://work.weixin.qq.com/ca/cawcdef5355a9f50ae',
							function(res) {
								console.log(res);
							}
						);
					} else {
						//未安装app
						uni.showModal({
							title: '提示',
							content: '您还没有此APP,去下载',
							success: function(res) {
								if (res.confirm) {
									plus.runtime.openURL('https://a.app.qq.com/o/simple.jsp?pkgname=com.tencent.mm', function(res) {
										console.log(res);
									});
								} else if (res.cancel) {
									console.log('用户点击取消');
								}
							}
						});
					}
				} else if (plus.os.name == 'iOS') {
					//苹果
					//因为ios查不到B款app在ios系统手机里面，其实下载了，也是检测不到，所以就不检测了
					//直接打开微信app，微信pp没有的话，会进入回调报错，我们在回调去打开下载链接
					plus.runtime.launchApplication(
						{
							action:
								'https://work.weixin.qq.com/ca/cawcdef5355a9f50ae'
						},
						function(e) {
							uni.showModal({
								title: '提示',
								content: '您还没有此APP,去下载',
								success: function(res) {
									if (res.confirm) {
										plus.runtime.openURL('https://a.app.qq.com/o/simple.jsp?pkgname=com.tencent.mm', function(res) {
											console.log(res);
										});
									} else if (res.cancel) {
										console.log('用户点击取消');
									}
								}
							});
						}
					);
				}
		
			}
		}
	}
</script>

<style lang="scss" scoped>
	.combox {
		padding: 48rpx 24rpx 56rpx;
		background: #fff;
		border-radius: 32rpx;
		margin-top: 16rpx;

		.comcard {
			margin-bottom: 32rpx;
			width: 343rpx;
			height: 400rpx;
			background: linear-gradient(180deg, rgba(0, 255, 209, 0.1) 0%, rgba(0, 255, 209, 0) 100%);
			box-shadow: inset 0px 0px 24px 0px rgba(183, 255, 238, 0.5);
			border-radius: 24px 24px 24px 24px;
			border-image: linear-gradient(180deg, rgba(221, 253, 243, 0.5), rgba(160, 244, 229, 0.5)) 1 1;
		}
	}
</style>